package org.testis.guiappsmodule.services;

import org.testis.data.TestStepDataObject;
import org.testis.data.parser.AtofModuleParameterNames;
import org.testis.guiappsmodule.data.GuiAppsModuleDataObject;
import org.testis.services.AtofModuleService;
import org.testis.services.AtofModuleTask;


/**
 *
 * @author nurhat
 */
public class GuiAppsModuleTask extends AtofModuleTask
{

    public GuiAppsModuleTask(TestStepDataObject dataObj,
                             AtofModuleService service)
    {
        super(dataObj,
              service);
    }


    @Override
    public void afterExecute()
    {

        GuiAppsModuleDataObject dobj =
            (GuiAppsModuleDataObject) m_service.getDataObj();
        m_result.getReturnValueList().put(
            AtofModuleParameterNames.GUI_APP_EXIT_CODE,
            dobj.getExitCode());
        m_result.getReturnValueList().put(
            AtofModuleParameterNames.GUI_APP_OUTPUT_STRING,
            dobj.getOutputString());
        m_result.getReturnValueList().put(
            AtofModuleParameterNames.GUI_APP_ERROR_STRING,
            dobj.getErrorString());
        super.afterExecute();
    }
}
